package com.mysoft.gfyx.marketdevelop.service;

import com.mysoft.framework.modeling.dto.ListDataResult;
import com.mysoft.gfyx.common.dto.ListResult;
import com.mysoft.gfyx.marketdevelop.controller.dto.ApplyDeveloperMainDataDto;
import com.mysoft.gfyx.marketdevelop.controller.dto.CreditCodeBaseRequestDto;
import com.mysoft.gfyx.marketdevelop.mip.dto.*;
import com.mysoft.gfyx.marketdevelop.mip.dto.TjCustom.ResponseDataDto;
import com.mysoft.gfyx.marketdevelop.mip.dto.TjCustom.SqlApiResponseDto;
import com.mysoft.gfyx.marketdevelop.mip.dto.TjMetric.QueryMetricRequestDto;
import com.mysoft.gfyx.marketdevelop.remoteService.dto.AddCustomersRequestDto;
import com.mysoft.gfyx.marketdevelop.service.dto.*;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface DeveloperService {

    String DEVELOPER_MAIN = "dim_ycg_common_developer_m";

    String TABLE_OPENED_TRADING = "dwd_ycg_kfs_saling_project_m";
    String TABLE_OPENED_TRADING_WITH_INVESTMENT = "dwd_ycg_kfs_saling_project_equity_m";

    String TABLE_PROCUREMENT_REQUIREMENT = "dwd_ycg_kfs_purchase_demand_m";
    String TABLE_PROCUREMENT_REQUIREMENT_WITH_INVESTMENT = "dwd_ycg_kfs_puchase_demand_equity_m";

    String TABLE_PROCUREMENT_PROJECT = "dwd_ycg_kfs_purchase_demand_project_m";

    String TABLE_FIND_SUPPLIER = "dwd_ycg_kfs_found_supplier_m";

    String TABLE_TAKE_LAND = "dwd_ycg_kfs_taken_land_m";
    String TABLE_TAKE_LAND_ALL = "dwd_ycg_kfs_taken_land_all";//土地数据：包含删除数据

    String TABLE_TAKE_LAND_WITH_INVESTMENT = "dwd_ycg_kfs_taken_land_equity_m";
    String TABLE_TAKE_LAND_USAGE = "dwd_ycg_kfs_take_land_usage_m";

    String TABLE_COOPERATOR = "dwd_ycg_kfs_cooperation_enterprise_m";
    String TABLE_COOPERATOR_WITH_INVESTMENT = "dwd_ycg_kfs_cooperation_equity_m";

    String TABLE_WINBID = "dwd_supplier_saas_winbid";

    String TABLE_WINBID_DW = "dw_supplier_saas_winbid";

    String TABLE_METRICS = "dws_ycg_kfs_all";

    String TABLE_INVESTMENT_RELATION = "dim_ycg_kfs_equity_penetration_m";

    String TABLE_LABEL = "dim_ycg_common_label_m";

    String TABLE_MULTI_DIM_TAKEN_LAND = "multi_dim_taken_land_with_label";

    String TABLE_CONTACT_WITH_INVESTMENT = "dwd_ycg_kfs_puchase_contact_equity_m";

    String TABLE_COMMENCE_PERMIT = "dwd_ycg_kfs_commence_permit_m";
    String TABLE_COMMENCE_PERMIT_WITH_INVESTMENT = "dwd_ycg_kfs_commence_permit_equity_m";

    enum TjEntity {
        Developer, TakingLand, Project;
    }

    String getEntityId(TjEntity entityFlag);

    <T extends BaseTjRequestDto> T setCommonData(T dto, TjEntity tjEntity);

    <T extends BaseTjRequestDto> T setCommonData(T dto);

    <T extends QueryMetricRequestDto> T setCommonData(T dto);

    Map<String, Object> getDeveloperMainData(String creditCode);

    Map<String, Object> getMetrics(String creditCode);

    ArrayList<BaseTjListItemDto> getDeveloperMainDataMulti(List<String> creditCodeList);

    List<CheckMainDataResponseDto> getDeveloperMainDataMultiName(List<String> developerNameList);

    Object applyDeveloperMainData(ApplyDeveloperMainDataDto reqDto);

    Object applySupplierMainData(ApplyDeveloperMainDataDto reqDto);

    boolean addCustomers(AddCustomersRequestDto customerDtos);

    Object getDeveloperMainDataAndSummary(String creditCode);

    Object getDeveloperDetailRiskCount(String creditCode);

    Object searchDeveloper(SearchDeveloperRequestDto dto);

    Object searchEnterpriseName(String keyword);

    Object searchOpportunityName(String keyword);

    Object searchLandName(String keyword);

    Object searchCommencePermitName(String keyword);

    Object searchProjectName(String keyword);

    Object searchWinBidName(String keyword);

    Object getOpportunityDetail(String id);

    Object getCertificates(CreditCodeBaseRequestDto dto);

    ArrayList<TagDto> getAllTags();

    ArrayList<TagDto> getDeveloperTags();

    Object getInvestment(GetInvestmentRequestDto dto);

    ArrayList<String> getDeveloperTagsIdList();

    Object getOpenedTradingData(String creditCode, GetOpenedTradingFilterDto filters, PagerDto pager);

    Object getProcurementRequirementData(String creditCode, GetProcurementRequirementFilterDto filterDto, PagerDto pager);

    BaseTjListDto getDeveloperDetailData(GetDeveloperFilterDataRequestDto dto);

    ListDataResult getTjResFromLoadData(BaseTjListResponseDto dto);

    ListDataResult getTjResFromLoadData(BaseTjListResponseDto res, TjResultMapChangerService tjResultMapChangerService);

    Map<String, Object> setTjRes(Map<String, Object> map);

    //高级筛选-找商机查询
    BaseTjListDto searchOpptyPurchase(GetDeveloperFilterDataRequestDto getDeveloperFilterDataRequestDto);

    BaseTjListDto getMetricsList(List<String> organizingCodeList, int page, int pageSize);

    ArrayList<String> getSubCompanyByInvestment(String creditCode);

    ListResult<Map<String, Object>> getDeveloperFeeds(String creditCode);

    DeveloperActivityRadarDto getActivityRadar(String creditCode, DeveloperMetricDto metric);

    List<Map<String, Object>> getMetricListByCreditCodeList(List<String> creditCodeList);

    ListDataResult getSqlApiResFromLoadData(SqlApiResponseDto res);

    ResponseDataDto getSqlApiRes(SqlApiResponseDto res);

    Object getDeveloperScoreDetail(String OrganizingCode);

    HashMap<String, Integer> getDeveloperScoreMapByCreditCodeList(List<String> creditCodeList);
}
